package com.last1mile.commons;

import org.apache.commons.lang.StringUtils;

public enum ReserveStatusEnum {
    INIT("init","reserveStatusInit"), 
    CONFIRM("confirm","reserveStatusConfirm"),
    REFUSE("refuse","reserveStatusRefuse"),
    CANCEL("cancel","reserveStatusCancel");

    private String value;
    private String labelKey;

    private ReserveStatusEnum(String value,String labelKey) {
        this.value = value;
        this.labelKey = labelKey;
    }

    public String getValue() {
        return value;
    }
    
    public String getLabelKey(){
    	return labelKey;
    }
    
    public static ReserveStatusEnum getByValue(String value){
    	for(ReserveStatusEnum reserveStatus : ReserveStatusEnum.values()){
    		if(StringUtils.equals(value, reserveStatus.getValue())){
    			return reserveStatus;
    		}
    	}
    	return null;
    }
}
